package java_012_everyday2;

import java.util.Scanner;

public class Profit {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double money = sc.nextDouble();
		double bonus;
		if(money<=100000){
			bonus=money*0.1;
		}else if(money>100000 && money<=200000){
			bonus=100000*0.1+(money-100000)*0.075;
		}else if(money>200000 && money<=400000){
			bonus=100000*0.1+100000*0.075+(money-200000)*0.05;
		}else if(money>400000 && money<=600000){
			bonus=100000*0.1+100000*0.075+200000*0.05+(money-400000)*0.03;
		}else if(money>600000 && money<=1000000){
			bonus=100000*0.1+100000*0.075+200000*0.05+200000*0.03+(money-600000)*0.015;
		}else{
			bonus=100000*0.1+100000*0.075+200000*0.05+200000*0.03+400000*0.015+(money-1000000)*0.01;
		}
		System.out.println(bonus);
	}
}
